<%@ page pageEncoding="UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <meta name="flexible" content="initial-dpr=2,maximum-dpr=3" />
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no">
    <title>创新企业空间</title>
    <link rel="stylesheet" href="../static/app/style/index.css"/>
</head>
<body>
<div class="xn-homePage">
    <div class="nav-title">
        <span class="logo f-left"></span>
        <div class="search-module f-right">
            <div class="filter-module down">
                <div class="filter">企业</div>
                <ul class="selectBox hide" id="searchtype">
                    <li class="item">企业</li>
                    <li class="item">载体</li>
                </ul>
                <input type="hidden" id="searchtypeKey" value="企业">
            </div>
            <input class="searchIpt" id="searchtypeVal" type="text" placeholder="请输入关键字" onkeydown="doSearch(event)"/>
            <div class="searchBtn" id="search"></div>
        </div>
    </div>
    <div class="head-module">
    </div>

    <ul class="clearfix wrap-list">
        <li class="item item1">
            <a href="#" onclick="enterprise()">
                <label class="icon">
                    <span class="aimIcon1"></span>
                </label>
                <span class="title">创新企业空间</span>
            </a>
        </li>
        <li class="item item2">
            <a href="#" onclick="carrier1()">
                <label class="icon">
                    <span class="aimIcon2"></span>
                </label>
                <span class="title">科技孵化器</span>
            </a>
        </li>
        <li class="item item3">
            <a href="#" onclick="carrier2()">
                <label class="icon">
                    <span class="aimIcon3"></span>
                </label>
                <span class="title">众创空间</span>
            </a>
        </li>
        <li class="item item4">
            <a href="#" onclick="carrier3()">
                <label class="icon">
                    <span class="aimIcon4"></span>
                </label>
                <span class="title">产学研载体</span>
            </a>
        </li>
        <li class="item item5">
            <a href="#" onclick="carrier4()">
                <label class="icon">
                    <span class="aimIcon5"></span>
                </label>
                <span class="title">科技服务机构</span>
            </a>
        </li>
        <li class="item item6">
            <a href="#" onclick="goVisitRecord()">
                <label class="icon">
                    <span class="aimIcon6"></span>
                </label>
                <span class="title">企业走访</span>
            </a>
        </li>
        <li class="item item7">
            <a href="#" onclick="sysdata()">
                <label class="icon">
                    <span class="aimIcon7"></span>
                </label>
                <span class="title">数据中心</span>
            </a>
        </li>
    </ul>
</div>

<script type="text/javascript" src="../static/app/js/jQuery-2.1.4.min.js"></script>
<script type="text/javascript" src="../static/app/js/resize.js"></script>
<script type="text/javascript" src="../static/app/js/page/index.js"></script>
<script type="text/javascript">
function enterprise() {
	window.location.href="${pageContext.request.contextPath}/app/enterpriselist?qccflag=''&searchname="+"";
};

function carrier1() {
	window.location.href="${pageContext.request.contextPath}/app/carrierlist1?searchname="+"";
};

function carrier2() {
	window.location.href="${pageContext.request.contextPath}/app/carrierlist2?searchname="+"";
};

function carrier3() {
	window.location.href="${pageContext.request.contextPath}/app/carrierlist3?searchname="+"";
};

function carrier4() {
	window.location.href="${pageContext.request.contextPath}/app/carrierlist4?searchname="+"";
};

function sysdata() {
	window.location.href="${pageContext.request.contextPath}/app/sysdata";
};

function goVisitRecord() {
	window.location.href="${pageContext.request.contextPath}/app/visitRecord";
};

$('#search').click(function(){
	var searchtypeKey = $("#searchtypeKey").val();
	var searchtypeVal = $("#searchtypeVal").val();
	if(searchtypeVal==""){
		$("#searchtypeVal").addClass("pred");
		return;
	}
	$("#searchtypeVal").removeClass("pred");
	if(searchtypeKey=='企业'){
		window.location.href="${pageContext.request.contextPath}/app/enterpriselist?qccflag='qcc'&searchname="+searchtypeVal;
	}
	else if(searchtypeKey=='载体'){
		window.location.href="${pageContext.request.contextPath}/app/carrierlist3?searchname="+searchtypeVal;
	}
})

$(document).ready(function(){
	var userRole = ${sessionScope.user.userRole};
	if (userRole != "2") {
		document.getElementById("isUserRole").style.display = "none";
	}
	$("#searchtypeKey").val('企业');
	var Uarry=$("#searchtype li");	//获取所有的li元素
	$("#searchtype li").click(function(){	//点击事件
		var count=$(this).index();	//获取li的下标
		var Tresult=Uarry.eq(count).text();
		$("#searchtypeKey").val(Tresult);
	})
})

</script>
</body>
</html>
